/**
 * 
 */
package com.gragra.applications;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author Christoph Teichmann
 * 20.10.2013
 */
public class DivideTagByTwo
{
	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new FileReader(args[0]));
		BufferedWriter bw = new BufferedWriter(new FileWriter(args[1]));
		String line;
		boolean first = true;
		while((line = br.readLine()) != null)
		{
			if(first)
			{first = false;}
			else
			{bw.newLine();}
			line = line.trim();
			boolean firstInLine = true;
			String[] parts = line.split("\\s+");
			for(String part : parts)
			{
				if(firstInLine)
				{firstInLine = false;}
				else
				{bw.write(" ");}
				String[] elems = part.split("/");
				if(elems.length > 2)
				{
					for(int i=1;i<elems.length-1;++i)
					{elems[0] = elems[0]+"/"+elems[i];}
				}
				bw.write(elems[0]);
				bw.write("/");
				bw.write(Integer.toString(Integer.parseInt(elems[elems.length-1])/2));
			}
		}
		br.close();
		bw.close();
	}
}